#include "include/config.h"
#include "include/cxxstd.h"

namespace zero
{
unsigned char* freeMem;

void* os_allocator(std::size_t size)
{
	void* p = freeMem;
	size = size < 4 ? 4 : size;
	size = size & 3 ? (size + 4) & ~3 : size;
	freeMem += size;
	// redzone.
	freeMem[0] = 0x1; freeMem[1] = 0x10; freeMem[2] = 0xa; freeMem[3] = 0xa0;
	freeMem += 4;
	return p;
}

void os_free(void*)
{
}
}
